package com.bestcem.xm.ticket.controller.vo;

import com.bestcem.xm.ticket.constant.ColumnConstant;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 通知提醒设置信息
 *
 * @author zq.ding <zq.ding@idiaoyan.com>
 * @version 通知提醒新增微信公众号需求
 * @date 2021/8/23 14:23
 * @date 2022/4/7 12:16 XiaoYunSong 通知提醒新增微信公众号需求 新增 是否开启免打扰/是否开启微信公众号通知
 */
@Data
public class NotificationVO implements Serializable {

    private static final long serialVersionUID = 8064963517056165316L;
    /**
     * id
     */
    private String id;

    /**
     * 免打扰规则
     */
    @JsonProperty("no_disturb")
    private List<String> noDisturb;

    /**
     * 是否开启免打扰
     * 通知提醒新增微信公众号需求 新增字段
     */
    @JsonProperty("no_disturb_enable")
    private Boolean noDisturbEnable;

    /**
     * 公司ID
     */
    private String orgId;

    /**
     * 通知规则设置
     */
    @JsonProperty("rule")
    private Rule rule;

    /**
     * 项目id
     */
    @JsonProperty("surveyId")
    private String surveyId;

    /**
     * 通知方式
     */
    @JsonProperty("ways")
    private Way ways;

    /**
     * 数据记录标记
     */
    @JsonProperty("record_flag")
    private Integer recordFlag;

    @JsonProperty("created_dt")
    private Date createdDate;

    @JsonProperty("created_id")
    private String createdId;

    @JsonProperty("updated_dt")
    private Date updatedDate;

    @JsonProperty("updated_id")
    private String updatedId;

    /**
     * 通知方式
     *
     * @author XiaoYunSong <ys.xiao@idiaoyan.com>
     * @version v1.0
     * @date 2021/8/10 17:50
     */
    @NoArgsConstructor
    @AllArgsConstructor
    @Data
    public static class Way implements Serializable {

        private static final long serialVersionUID = 8244454978806285004L;
        /**
         * 邮箱列表
         */
        @JsonProperty("email")
        private List<String> emails;

        /**
         * 是否开启邮箱通知
         */
        @JsonProperty("email_enable")
        private Boolean emailEnable;

        /**
         * 手机号列表
         */
        @JsonProperty("mobile")
        private List<String> mobiles;

        /**
         * 是否开启手机通知
         */
        @JsonProperty("mobile_enable")
        private Boolean mobileEnable;

        /**
         * 是否开启微信公众号通知 通知提醒新增微信公众号需求 新增字段
         */
        @JsonProperty("wechat_public_enable")
        private Boolean wechatPublicEnable;
    }

    @NoArgsConstructor
    @AllArgsConstructor
    @Data
    public static class Rule implements Serializable {

        private static final long serialVersionUID = 7011194179379707506L;

        /**
         * everySCRspdEnable
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.EVERYSCRSPDENABLE)
        private Boolean everyRspdEnable;

        /**
         * sCRspdReachEnable
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.SCRSPDREACHENABLE)
        private Boolean reachEnable;

        /**
         * sCRspdReachCount
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.SCRSPDREACHCOUNT)
        private Integer reachCount;

        /**
         * sCRspdFreqEnable
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.SCRSPDFREQENABLE)
        private Boolean freqEnable;

        /**
         * sCRspdFreqTime
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.SCRSPDFREQTIME)
        private String freqTime;

        /**
         * sCRspdFreqOperator
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.SCRSPDFREQOPERATOR)
        private String freqOperator;

        /**
         * sCRspdFreqValue
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.SCRSPDFREQVALUE)
        private Integer freqValue;

        /**
         * sCRspdRatioEnable
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.SCRSPDRATIOENABLE)
        private Boolean ratioEnable;

        /**
         * sCRspdRatioTime
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.SCRSPDRATIOTIME)
        private String ratioTime;

        /**
         * sCRspdRatioOperator
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.SCRSPDRATIOOPERATOR)
        private String ratioOperator;

        /**
         * sCRspdRatioValue
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.SCRSPDRATIOVALUE)
        private Integer ratioValue;

        /**
         * quoteFullEnable
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.QUOTEFULLENABLE)
        private Boolean quoteFullEnable;

        /**
         * awardBonusEnable
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.AWARDBONUSENABLE)
        private Boolean awardBonusEnable;

        /**
         * awardDrawEnable
         */
        @JsonProperty(value = ColumnConstant.Notification.Rule.AWARDDRAWENABLE)
        private Boolean awardDrawEnable;

    }
}
